#include "gtkPrincipal.h"

GtkPrincipal * creer_GPri()
{
  GtkPrincipal * principal;
  GtkWidget *panel;

  principal = (GtkPrincipal *) malloc (1 * sizeof(GtkPrincipal));
  principal->ginfo = creer_GInf();
  principal->gArbre = creer_GArb(principal->ginfo);

  principal->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);

  panel = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);

  gtk_box_pack_start(GTK_BOX(principal->hbox), panel, TRUE, TRUE, 1);

  gtk_paned_pack1 (GTK_PANED (panel), getContainer(principal->ginfo), TRUE, FALSE);

  gtk_widget_set_size_request(getContainer(principal->ginfo), 400, -1); 
  gtk_paned_add2 (GTK_PANED (panel), getContainer_GArb(principal->gArbre));
  gtk_paned_set_position(GTK_PANED(panel), 500);
  return principal;
}

GtkWidget * getContainer_GPri(GtkPrincipal * pPrincipal)
{
  return pPrincipal->hbox;
}
